<div class="wrapper right-box-wrapper">
    <div class="right-box-title"><a href="#" title="Sản phẩm" class="right-box-caption"><h2><?php if(!empty($title)) echo $title; else echo 'Sản phẩm bán chạy';?></h2></a><a href="<?=site_url('thangthanh/listproduct/0')?>" class="show-all-product" title=""><?php if(isset($trangchu)) echo 'Xem toàn bộ sản phẩm'?></a></div>
    <div class="right-box-content">
        
        <div class="list-products-wrapper">
            <?php
				$i=1;
            	foreach($sanphamtrangchu as $sanpham):
				
				if($i==1)
					echo '<div style="clear:both; float:left; margin-top: 5px; margin-bottom:5px; height:1px; width:100%;"></div>';
			?>
            
                <!--block-->
                <a href="<?=site_url('thangthanh/detailproduct/'.$sanpham->id)?>" title="">
                	<?php
                    	if(!empty($sanpham->hinhanh))
							echo '<img src="'.$sanpham->hinhanh.'" alt="" title="'.$sanpham->tieude.'" width="194" height="112">';
					?>
                    
                    <h5><?=$sanpham->tieude?></h5>
                    
                    <strong>Giá: <font><?php
                    	if($sanpham->gia=='Liên hệ' || $sanpham->gia==0 || empty($sanpham->gia) || $sanpham->gia=='')
							echo 'Liên hệ';
						else
							echo $sanpham->gia.' VNĐ';
					?></font></strong>
                </a>
                <!--/block-->
            <?php
				$i++;
				if($i==4)
					$i=1;
            	endforeach;
			?>
            
        </div>
        <style type="text/css">
			div.pages a{
				float:left;
				margin-left:3px;
				padding:2px 4px;
				background:#F3F3F3;
				border:solid 1px #BABABA;
				color:#30B5D6;
				font-weight:bold;
			}
			div.pages a:hover, div a.active_page{
				background:#30B5D6;
				color:#FFF;
				
			}
		</style>
        <div class="pages" style="clear:both; float:right; margin-top:8px; margin-bottom:10px;">
        	<?php
				echo $this->pagination->create_links();
            ?>
        </div>
        
    </div>
    <div class="right-box-shadow"></div>
</div>